#ifndef __EXCEPTION_H__
#define __EXCEPTION_H__
#include "common.h"
#include "define_macro.h"
#include <stdexcept>

class ExcpBase:public std::logic_error{
public:
	ExcpBase( int32_t errCode, const std::string& msg ):std::logic_error(msg){
		mErrCode = errCode;
	}
private:
	DEFINE_MEMBER( int32_t, ErrCode )
};

#define THROW( ERRCODE, ERRMSG )			\
	do{						\
		ExcpBase eb4d40cd_88c7_4542_8b61_9e38cf9f3ce4( ERRCODE, ERRMSG);	\
		throw eb4d40cd_88c7_4542_8b61_9e38cf9f3ce4;				\
	}while(0)
#endif

